<template>
  <div class="public-activity-detail">
    <h2>{{ activity.title }}</h2>
    <p>{{ activity.description }}</p>
    <p>Date: {{ activity.date }}</p>
    <p>Location: {{ activity.location }}</p>
  </div>
</template>

<script>
import activities from '@/assets/hw10_activities.json';

export default {
  data() {
    return {
      activity: {}
    };
  },
  created() {
    const id = this.$route.params.id;
    this.activity = activities.find(a => a.id == id);
  }
};
</script>